<template>
    <div class="wrap">
        <div v-for='game in games' :key='game.GAME_ID' v-if='game.GAME_STEP != "5"' @click='gotoDetail(game.GAME_ID)'>
          <game-item :game='game' ></game-item>
          <div class="divide"></div>
        </div>
	</div>
</template>
<style lang='less' scoped>
.wrap{
    background: #fff;
    .divide{
        border-bottom: dashed 1px #a1a1a1;
        margin: 0 8%;
    }
}

</style>
<script>
	import RemoteDAO from 'common/remoteDAO'
    import GameItem from 'components/game/gamelist/GameItem'
	export default{
        components:{GameItem},
		data(){
			return {
				games:[],
				noData: true
			}
		},
		created(){
			this.getHSGames();
		},
		methods:{
			gotoDetail(gameId){
				this.$router.push({path: '/game/gamedetail',query:{gameId:gameId}});
			},
			getHSGames(){
				RemoteDAO.hotSearch(4, (response) =>{
                    if(response.error == '0'){
                        if(response != undefined && response.data.body != undefined && response.data.body.length > 0){
                            this.games = response.data.body;
                        }
                    }
					
				});
			},
			
		}
	}
</script>